Component({
    behaviors: [],
    properties:{
        myProperity:{
            type: String,
            value: ''
        },
        myProperity2: String;
    },

    lifetimes:{
        attached: function(){},
        moved: function(){},
        detached: function(){}
    },
    attached: function(){},
    ready: function(){},

    pageLifttimes:{
        show: function(){},
        hide: function(){},
        resize: function(){},
    },

    methods:{
        onMyButtonTap: function(){
            this.setData({
                //更新属性和数据大方法与更新页面数据的方法类似
            })
        },
        //内部方法建议以下划线开头
        _myPrivateMethod: function(){
            this.setData({
                'a[0][8]': "myPrivateData"
            })
        },
        _properityChange: function(newVal, oldVal){}
    }
})